package structs

import (
	"github.com/buger/jsonparser"
	"github.com/pkg/errors"
)

type User struct {
	UserId int64 `json:"user_id"`
	MyLikePlaylistID int64 `json:"my_like_playlist_id"`
	Nickname string `json:"nickname"`
	AvatarUrl string `json:"avatar_url"`
	AccountId int64 `json:"account_id"`
}

func NewUserFromLocalJson(json []byte) (User, error) {
	var user User
	if len(json) == 0 {
		return user, errors.New("User JSON file is empty")
	}

	return user, nil
}